home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / Graphics / include / point_3d.h < prev    next >
Encoding:
Text File  |  1995-03-25  |  2.2 KB  |  45 lines  |  [TEXT/MMCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    point_3d.h
  3. //    Date:                    8/26/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains the class definition for a point_3d
  7. //
  8. //------------------------------------------------------------------------------
  9.  
  10. #include "tuple_3d.h"
  11.  
  12. #ifndef    POINT_3D
  13. #define    POINT_3D
  14.  
  15. //------------------------------------------------------------------------------
  16. //    classes
  17. //------------------------------------------------------------------------------
  18. #ifndef    VECTOR_3D
  19. class    vector_3d;                                                                                                                                //    forward declaration
  20. #endif
  21.  
  22. //------------------------------------------------------------------------------
  23. class    point_3d : public tuple_3d                                                                                                //    4 dimensional point_3d class
  24. {                                                                                                                                                                //    begin point_3d class definition
  25.     public:                                                                                                                                                //    public interface
  26.         point_3d (void) {}                                                                                                                    //    default constructor
  27.         point_3d (real x, real y, real z, real w = R(1.0));                                                    //    constructor from 4 values
  28.         point_3d (const point_3d &p);                                                                                                //    copy constructor
  29.         point_3d (const vector_3d &v);                                                                                            //    constructor from a vector_3d
  30.         point_3d (const tuple_3d &t);                                                                                                //    constructor from a tuple_3d
  31.         point_3d    &operator = (const point_3d &p);                                                                    //    assignment operator
  32.         point_3d    &operator = (const tuple_3d &t);                                                                    //    assignment operator
  33.         void            operator () (real x, real y, real z, real w = R(1.0));                        //    function call operator
  34.         vector_3d    operator - (const point_3d &p) const;                                                            //    subtraction operator
  35.         point_3d    operator + (const vector_3d &v) const;                                                        //    addition of a vector_3d to a point_3d
  36. };                                                                                                                                                            //    end point_3d class definition
  37.  
  38. //------------------------------------------------------------------------------
  39. //    global variables
  40. //------------------------------------------------------------------------------
  41. extern    point_3d    ORIGIN_3D;                                                                                                        //    the origin of the coordinate system
  42.  
  43. //------------------------------------------------------------------------------
  44.  
  45. #endif    //POINT_3D